package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.StationDto;
import com.shensi.api.admin.domian.station.dto.StationOillGunDto;
import com.shensi.api.admin.domian.station.dto.StationOillGunPriceForm;
import com.shensi.api.admin.domian.station.dto.SyncUserDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface StationOillGunClient {


    /**
     * 查询油站信息列表
     */
    @GetMapping("/stationOillGun/info/list")
    public TableDataInfo list(@SpringQueryMap StationOillGunDto stationOillGun);


    /**
     * 查询油站信息列表
     */
    @GetMapping("/stationOillGun/info/gzhList")
    public TableDataInfo gzhList(@SpringQueryMap StationOillGunDto stationOillGun);


    /**
     * 通过油站id获取抢号信息
     */
    @GetMapping("/stationOillGun/info/oilGun/{stationId}")
    public AjaxResult listByStationId(@PathVariable("stationId") Long stationId);

    @GetMapping("/stationOillGun/info/ometer/oilGun")
    public AjaxResult getOilGun(@RequestParam("stationId") Long stationId);

    /**
     * 新增油品
     */
    @PostMapping("/stationOillGun/info")
    public AjaxResult add(@RequestBody StationOillGunDto stationOillGun);

    /**
     * 逻辑删除
     */
    @PostMapping(value = "/stationOillGun/info/deleteStationOilGun")
    public AjaxResult deleteStationOilGun(@RequestBody StationOillGunDto stationOillGun);
    /**
     * 获取油站信息详细信息
     */
    @GetMapping(value = "/stationOillGun/info/{gunId}")
    public AjaxResult getInfo(@PathVariable("gunId") Long gunId);

    /**
     * 修改油站信息
     */
    @PutMapping("/stationOillGun/info")
    public AjaxResult edit(@RequestBody StationOillGunDto stationOillGun);

    @PutMapping("/stationOillGun/info/updateOilGunPrice")
    public AjaxResult updateStationOillGunPrice(@RequestBody StationOillGunPriceForm stationOillGunPriceForm);

    @PutMapping("/stationOillGun/info/smallProgramUpdateOilGunPrice")
    public AjaxResult smallProgramUpdateOilGunPrice(@RequestBody StationOillGunPriceForm stationOillGunPriceForm) ;

    @PostMapping("/stationOillGun/info/ometer/oilName")
    public AjaxResult getOmeterOilName(@RequestBody StationDto station);
}
